package com.fanxing.generics;

public class Test04 {
    public static void main(String[] args) {
        Person p = new Person();
        p.fun1("Hello");
        p.fun1(100);

        Person<String,String> p2 = new Person<>();
        p2.t = "100";
        p2.fun1(100);
    }
}

class Person<K,T>{

    T t;

    /**
     * 泛型方法
     * @param t
     * @param <T>
     */
    public <T> T fun1(T t){
        System.out.println("====>"+ t);
        return t;
    }

    public <T> T fun1(T t,K k){
        System.out.println("====>"+ t);
        return t;
    }

    public static <T> T fun3(T t){
        return null;
    }

    public <T,K,V> void fun2(T t){
        return ;
    }


}
